From: Jonas Dreßler Date: Thu, 8 Aug 2019 19:09:06 +0000 (+0200) Subject: viewSelector: Use onStopped callback when fading out pages X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ada01507a45f39b1d3e6a8517621247587e23593;p=gnome-shell.git viewSelector: Use onStopped callback when fading out pages With 8b368d010 we fixed a bug where the onComplete callback was always called no matter whether the transition was interrupted before or not. This exposed another bug: viewSelector depends on this behaviour when fading out pages: After fading out a page, we call `this._animateIn` to show the new page. Now if the fade-out animation gets interrupted, with the correct behaviour of onComplete we end up not showing a new page and the viewSelector remains empty instead. One case where this happens is when pressing a key to start a search during the overview-animation. Obviously we also want to show the new page in case the fade-out animation was interrupted, so use the onStopped callback instead of the onComplete callback here. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/674 --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index c4201239e..ddf372e1d 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -334,7 +334,7 @@ var ViewSelector = class { opacity: 0, duration: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME, mode: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => this._animateIn(oldPage) + onStopped: () => this._animateIn(oldPage) }); }